﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows.Media;

namespace ACC.Extensions.PCClient.Entities
{
    /// <summary>
    /// 设备连接状态类
    /// 实现INotifyPropertyChanged 可及时更新前端
    /// </summary>
    public class DeviceStatus : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;

        /// <summary>
        /// 设备名称
        /// </summary>
        public string Name { get; set; }

        //是否连接
        private bool isConnected;

        public bool IsConnected
        {
            get { return isConnected; }
            set
            {
                isConnected = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("IsConnected"));
                }
            }
        }
    }

 
}
